Skip to content

Fix approval/user-input events using orchestration ID instead of provider thread ID#1150

Closed
cursor[bot] wants to merge 1 commit intocodething/648ca884-claudefrom
cursor/approval-events-thread-id-51cf
Closed

Fix approval/user-input events using orchestration ID instead of provider thread ID#1150
cursor[bot] wants to merge 1 commit intocodething/648ca884-claudefrom
cursor/approval-events-thread-id-51cf

Conversation

@cursor
Copy link
Contributor

@cursor cursor bot commented Mar 16, 2026

What Changed

In ClaudeAdapter.ts, four event emissions in the approval and user-input handlers (handleAskUserQuestion request/resolved and canUseTool request/resolved) were using context.session.threadId as providerThreadId directly, instead of calling providerThreadRef(context) which correctly maps context.resumeSessionId. Replaced all four occurrences with the helper function call.

Why

context.session.threadId is the orchestration-level thread ID, not the Claude SDK's native session ID. Every other event emission in the file correctly uses providerThreadRef(context), which returns context.resumeSessionId. This inconsistency meant approval and user-input runtime events carried an incorrect provider thread reference, breaking observability and any downstream logic correlating events by provider thread ID.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

Note

Fix approval and user-input events to use provider thread ID instead of orchestration ID

In ClaudeAdapter.ts, the providerRefs field in emitted runtime events (user-input.requested, user-input.resolved, and canUseTool request/decision events) was using an inline conditional providerThreadId field. These sites now use providerThreadRef(context) to ensure the correct provider thread ID is referenced consistently.

Macroscope summarized 241180f.

…ider thread ID

Replace direct use of context.session.threadId with providerThreadRef(context)
in four locations within approval and user-input handlers, consistent with all
other event emissions in the file.

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants